package cn.spring.dao.impl;

import cn.spring.dao.UserDao;
import cn.spring.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

//示例十八
//通过注解定义了一个DAO
@Component("userDao")
public class UserDaoImpl implements UserDao {
    //声明接口类型的引用和具体实现类型解耦合
    public void save(User user){
        System.out.println("保存用户信息到数据库");
    }
}
